What is lodash.isplainobject?
The lodash.isplainobject npm package is a module that provides a function to check if a given value is a plain object, that is, an object created by the Object constructor or one with a null prototype.
Check for plain objects
This feature allows you to verify if a value is a plain object. It returns true for objects created by the Object constructor or with a null prototype and false for any other type of value, including arrays, functions, and instances of built-in JavaScript types like Date.
const isPlainObject = require('lodash.isplainobject');
console.log(isPlainObject({})); // true
console.log(isPlainObject(Object.create(null))); // true
console.log(isPlainObject([1, 2, 3])); // false
console.log(isPlainObject(Function)); // false
console.log(isPlainObject(new Date())); // false